/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simplemetrosystem.view;

import java.awt.Component;
import java.awt.Container;
import java.awt.Font;

/**
 *
 * @author Eric Qian
 */
public class MetroUpdate {

    /**
     * 
     * @param comp
     * @param font
     */
    public static void updateFont(Component comp, Font font) {
        comp.setFont(font);
        if (comp instanceof Container) {
            Container c = (Container) comp;
            int n = c.getComponentCount();
            for (int i = 0; i < n; i++) {
                updateFont(c.getComponent(i), font);
            }
        }
    }
}
